package com.stlm2.dems.entity.base;

import com.stlm2.dems.entity.ShoppingCartState;

import java.math.BigDecimal;
import java.util.Date;

/**
 * Created by zlq on 2017/10/17.
 */
public class BaseDdmShoppingCart {
    //
    private int id;
    //用户ID
    private int userId;
    //商品ID
    private int goodsId;
    //会员价格
    private BigDecimal memberPrice;
    //叮当价格
    private BigDecimal ddPrice;
    //数量
    private int count;
    //状态
    private ShoppingCartState shoppingCartState;
    //规格详情ID
    private Integer specificationId;
    //创建时间
    private Date createTime;
    //创建人
    private int createUserId;
    private String valueAddedServicesIds;

    public String getValueAddedServicesIds() {
        return valueAddedServicesIds;
    }

    public void setValueAddedServicesIds(String valueAddedServicesIds) {
        this.valueAddedServicesIds = valueAddedServicesIds;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public int getUserId() {
        return userId;
    }

    public void setUserId(int userId) {
        this.userId = userId;
    }

    public int getGoodsId() {
        return goodsId;
    }

    public void setGoodsId(int goodsId) {
        this.goodsId = goodsId;
    }

    public BigDecimal getMemberPrice() {
        return memberPrice;
    }

    public void setMemberPrice(BigDecimal memberPrice) {
        this.memberPrice = memberPrice;
    }

    public BigDecimal getDdPrice() {
        return ddPrice;
    }

    public void setDdPrice(BigDecimal ddPrice) {
        this.ddPrice = ddPrice;
    }

    public int getCount() {
        return count;
    }

    public void setCount(int count) {
        this.count = count;
    }

    public ShoppingCartState getShoppingCartState() {
        return shoppingCartState;
    }

    public void setShoppingCartState(ShoppingCartState shoppingCartState) {
        this.shoppingCartState = shoppingCartState;
    }

    public Integer getSpecificationId() {
        return specificationId;
    }

    public void setSpecificationId(Integer specificationId) {
        this.specificationId = specificationId;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public int getCreateUserId() {
        return createUserId;
    }

    public void setCreateUserId(int createUserId) {
        this.createUserId = createUserId;
    }
    /**
     * 映射：状态
     */
    public Integer getShoppingCartStateValue() {
        return (shoppingCartState != null) ? shoppingCartState.getIntValue() : null;
    }

    public void setShoppingCartStateValue(Integer value) {
        if (value != null)
            this.shoppingCartState = ShoppingCartState.getByIntValue(value);
    }
}
